package com.app.implementation.dao;


import com.app.model.Personnel;
import com.app.interfaces.interfaceDAO;
import java.util.List;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

/**
 *
 * @author Krachleur
 */
public class PersonnelDaoImpl extends HibernateDaoSupport implements interfaceDAO {

    public void save(Object inst) {
        Personnel pers = (Personnel)inst;
        this.getHibernateTemplate().save(pers);
    }

    public void modify(Object inst) {
        Personnel pers = (Personnel)inst;
        this.getHibernateTemplate().update(pers);
    }

    public void delete(Object inst) {
        Personnel pers = (Personnel)inst;
        this.getHibernateTemplate().delete(pers);
    }

    public List findAll() {
       return (List)this.getHibernateTemplate().loadAll(Personnel.class);
    }

}
